<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>指尖上行</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="../../css/css.css">
<link rel="stylesheet" href="../../css/RaceList.css">
<link rel="stylesheet" href="../../../bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../../../bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../../../bower_components/Ionicons/css/ionicons.min.css">
<link rel="stylesheet" href="../../../dist/css/AdminLTE.min.css">
<link rel="stylesheet" href="../../../dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="../../../bower_components/jvectormap/jquery-jvectormap.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
<link rel="stylesheet" href="../../../bower_components/bootstrap-daterangepicker/daterangepicker.css">
<link rel="stylesheet" href="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
</head>
<body class="hold-transition skin-blue sidebar-mini"  data-treeview="2" data-treeview-menu="2">
<div class="wrapper">
  <header class="main-header"> <a class="logo"> <span class="logo-mini"><b>指</b></span> <span class="logo-lg"><img src="../../img/logo.png"/></span></a>
    <nav class="navbar navbar-static-top"><a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button"></a></nav>
  </header>
  <aside class="main-sidebar">
    <section class="sidebar">
      <ul class="sidebar-menu" data-widget="tree">
       
      </ul>
    </section>
  </aside>
  <div class="content-wrapper">
    <section class="content-search">
      <div class="form-group">
        <label>赛事名称</label>
        <input type="text" class="form-control w140" placeholder="赛事名称" id="matchname">
      </div>
      <div class="form-group">
        <label>赛事ID</label>
        <input type="text" class="form-control w140" placeholder="赛事ID" id="matchid">
      </div>
      <div class="form-group">
        <label>游戏类型</label>
        <select class="form-control w140" id="informationType">
        </select>
      </div>
      <div class="form-group">
        <label>比赛日</label>
        <select class="form-control w140" id="matchdate">
          <option value="0">全部</option>
          <option value="1">星期一</option>
          <option value="2">星期二</option>
          <option value="3">星期三</option>
          <option value="4">星期四</option>
          <option value="5">星期五</option>
          <option value="6">星期六</option>
          <option value="7">星期日</option>
        </select>
      </div>
      <div class="form-group">
        <button type="button" class="btn btn-primary btnsearch">搜索</button>
      </div>
    </section>
    <!-- 发布对阵图窗口 -->
    <div class="modal fade" id="modal-release" style="display: none;">
      <div class="modal-dialog w900">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">发布对阵图</h4>
          </div>
          <div class="modal-body">
            <div class="time">
              <ul><li><label class="fl">第一轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date0">
                </div></li><li><label class="fl">第二轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date1">
                </div></li><li><label class="fl">第三轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date2">
                </div></li><li><label class="fl">第四轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date3">
                </div></li><li><label class="fl">第五轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date4">
                </div></li><li><label class="fl">第六轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date5">
                </div></li><li><label class="fl">第七轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date6">
                </div></li><li><label class="fl">第八轮</label><div class="input-group date w180 fl">
                  <div class="input-group-addon"> <i class="fa fa-calendar"></i> </div>
                  <input type="text" class="form-control pull-right" id="date7">
                </div></li></ul>
            </div>
            <div class="box-title">第一轮对阵图</div>
            <div class="box box-primary">
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnrelease">发布对阵图</button>
            <button type="button" class="btn btn-primary btnSort">重新排序</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 查看对阵图窗口 -->
    <div class="modal fade" id="modal-view" style="display: none;">
      <div class="modal-dialog w900">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">查看对阵图</h4>
          </div>
          <div class="modal-body">
            <div class="box-title">第一轮对阵图</div>
            <div class="box box-primary">
              <div>
                <ul>
                </ul>
                <label data-toggle="modal" data-target="#modal-result">更改赛果</label>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary numprev">上一轮</button>
            <button type="button" class="btn btn-primary numnext">下一轮</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 取消赛事窗口 -->
    <div class="modal fade" id="modal-delete" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">确认</h4>
          </div>
          <div class="modal-body">确认取消该赛事吗？</div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btndelete">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 添加详情图 -->
    <div class="modal fade" id="modal-addimg" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">添加详情图</h4>
          </div>
          <div class="modal-body"><div class="form-group">
                  <label>图片上传</label>
                  <input id="lefile3" type="file" name="myfile" style="display:none">
                  <input id="photoCover3" class="form-control w180" type="text">
                  <a class="btn upload" onclick="$('input[id=lefile3]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                  <div class="imgfile3"></div>
                </div></div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnaddimg">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 新建修改窗口 -->
    <div class="modal fade" id="modal-addupdate" style="display: none;">
      <div class="modal-dialog w800">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">修改赛事</h4>
          </div>
          <div class="modal-body">
            <div class="box-body">
              <div class="form-group">
                <label>赛事名称</label>
                <input type="text" class="form-control w450 matchName" placeholder="赛事名称">
                <input type="hidden" id="id">
              </div>
              <div class="form-group">
                <label>赛制</label>
                <select class="form-control w180 matchSystem" id="matchSystem">
                </select>
                <label>队伍下限</label>
                <input type="text" class="form-control w180 minLimit" placeholder="队伍下限">
              </div>
              <div class="form-group">
                <label>所属游戏</label>
                <select class="form-control w180 gameType" id="gameType">
                </select>
                <label>人数要求</label>
                <input type="text" class="form-control w180 minSize" placeholder="人数要求">
              </div>
              <div class="form-group">
                <label>区服</label>
                <select class="form-control w180 serverType" id="serverType">
                </select>
                <select class="form-control w180 terraceType" id="terraceType">
                </select>
              </div>
              <div class="form-group">
                <label>报名费</label>
                <select class="form-control w180 entryFeeType" id="entryFeeType">
                </select>
                <input type="text" class="form-control w180 entryFee" placeholder="数量">
              </div>
              <div class="form-group">
                <label>报名时间</label>
                  <input type="datetime-local" class="form-control w200 entryTime" id="datepicker"/>
                <label>截止时间</label>
                  <input type="datetime-local" class="form-control w200  endEntryTime" id="datepicker2"/>
              </div>
              <div class="form-group">
                <label>开始时间</label>
                  <input type="datetime-local" class="form-control w200 startTime" id="datepicker3"/>
                <label>结束时间</label>
                  <input type="datetime-local" class="form-control w200" id="datepicker4"/>
              </div>
              <div class="form-group">
                <label>比赛日</label>
                <div class="form-control w600 gameDay">
                  <input name="" type="checkbox" value="1">
                  星期一
                  <input name="" type="checkbox" value="2">
                  星期二
                  <input name="" type="checkbox" value="3">
                  星期三
                  <input name="" type="checkbox" value="4">
                  星期四
                  <input name="" type="checkbox" value="5">
                  星期五
                  <input name="" type="checkbox" value="6">
                  星期六
                  <input name="" type="checkbox" value="7">
                  星期日</div>
              </div>
              <div class="form-group">
                <label>列表图片</label>
                <input id="lefile1" type="file" name="myfile" style="display:none">
                <input id="photoCover1" class="form-control w180 matchPic" type="text">
                <a class="btn upload" onclick="$('input[id=lefile1]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                <div class="imgfile1"></div>
              </div>
              <div class="form-group">
                <label>赛事海报</label>
                <input id="lefile2" type="file" name="myfile2" style="display:none">
                <input id="photoCover2" class="form-control w180 matchPoster" type="text">
                <a class="btn upload" onclick="$('input[id=lefile2]').click();">选择文件 <i class="glyphicon glyphicon-folder-open" aria-hidden="true"></i></a>
                <div class="imgfile2"></div>
              </div>
              <div class="form-group">
                <label class="fl">赛事介绍</label>
                <div class="fl w650 matchIntroduce">
                  <form>
                    <textarea id="editor1" name="editor1" rows="10" cols="80" class=""></textarea>
                  </form>
                </div>
              </div>
              <div class="form-group">
                <label>是否置顶</label>
                <select class="form-control w180 isStick">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
              <div class="form-group reward matchPrize">
                <label style="display:block; float:none" class="mp">比赛奖励</label>
                <div></div>
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary submit">提交</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 更换位置 -->
    <div class="modal fade" id="modal-path" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">更换位置</h4>
          </div>
          <div class="modal-body"> <span>将<a class="mpath">1</a>号位置与几号互换</span>
            <input type="text" class="form-control w140 vpath" >
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary btnpath">确认</button>
          </div>
        </div>
      </div>
    </div>
    <!-- 更改赛果 -->
    <div class="modal fade" id="modal-result" style="display: none;">
      <div class="modal-dialog w400">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span></button>
            <h4 class="modal-title">更改赛果</h4>
          </div>
          <div class="modal-body">
            <button type="button" class="btn btn-block btn-primary btnresult1">1队赢，2队输</button>
            <button type="button" class="btn btn-block btn-primary btnresult2">2队赢，1队输</button>
            <button type="button" class="btn btn-block btn-primary btnresult3">2队都淘汰</button>
          </div>
        </div>
      </div>
    </div>
    <section class="content">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">赛事列表</h3>
        </div>
        <div class="box-body">
          <table id="example1" class="table table-bordered table-striped" style="min-width:1500px">
          </table>
          <div class="paginationDiv">
            <ul class="pagination">
              <li class="prev"><a>上一页</a></li>
              <li class="next"><a>下一页</a></li>
            </ul>
            <input type="text" value="1" class="form-control curpage"/>
            <button type="button" class="btn btn-default gopage">跳转</button>
            <span class="pageinfo"></span> </div>
        </div>
      </div>
    </section>
  </div>
</div>
<script type="text/html" id="datalist">
  <thead>
     <tr role="row">
        <th>ID</th>
        <th>赛事名称</th>
        <th>所属游戏</th>
        <th>列表图片</th>
        <th>赛事海报</th>
        <th>赛制</th>
        <th>队伍下限</th>
        <th>报名费</th>
        <th>比赛日</th>
        <th>开始报名时间</th>
        <th>截止报名时间</th>
        <th>开始比赛时间</th>
        <th>赛事奖品</th>
        <th>赛事状态</th>
        <th>是否置顶</th>
        <th>操作</th>
    </tr>
    </thead>
  <tbody>
  <%for(var i = 0,len= dataset.length;i < len;i++){%>
    <tr role="row">
      <td class="thisId"><%= dataset[i].id%></td>
      <td><%= dataset[i].matchName%></td>
      <td><%= dataset[i].gameType%></td>
      <td><img src="<%= dataset[i].matchPic==null?'../../img/defeat.png':dataset[i].matchPic%>" width="80px"></td>
      <td><img src="<%= dataset[i].matchPoster==null?'../../img/defeat.png':dataset[i].matchPoster%>" width="80px"></td>
      <td><%= dataset[i].matchSystem%></td>
      <td><%= dataset[i].minLimit%></td>
      <td><%= dataset[i].entryFee%><%= dataset[i].entryFeeType%></td>
      <td><%= dataset[i].gameDay%></td>
      <td><%= dataset[i].entryTime%></td>
      <td><%= dataset[i].endEntryTime%></td>
      <td><%= dataset[i].startTime%></td>
      <td>
        <%for(var j = 0,len1= dataset[i].matchPrize.length;j < len1;j++){%>
          <p style="text-align: left;"><%= dataset[i].matchPrize[j].ranking + ': ' + dataset[i].matchPrize[j].awardContent + dataset[i].matchPrize[j].awardType%></p>
        <%}%>
      </td>
      <td><%= dataset[i].matchStatus%></td>
      <td><%= dataset[i].isStick==0?"否":"是"%></td>
      <td>
	  <%if(dataset[i].planTotal>0){%>
        <button type="button" class="btn btn-info btn-xs view" data-id="<%= dataset[i].id%>" data-toggle="modal" data-target="#modal-view">查看对阵图</button>
	  <%}else{%>
	    <%if(dataset[i].matchStatus=="开赛准备"){%>
        <button type="button" class="btn btn-info btn-xs release" data-id="<%= dataset[i].id%>" data-toggle="modal" data-target="#modal-release">发布对阵图</button>
		<%}%>
	  <%}%>
		<button type="button" class="btn btn-info btn-xs update" data-id="<%= dataset[i].id%>" data-toggle="modal" data-target="#modal-addupdate">修改</button>
        <button type="button" class="btn btn-info btn-xs addimg" data-id="<%= dataset[i].id%>" data-toggle="modal" data-target="#modal-addimg">添加详情图</button>
        <button type="button" class="btn btn-info btn-xs delete" data-matchId="<%= dataset[i].id%>" data-toggle="modal" data-target="#modal-delete">取消赛事</button>
      </td>
      </tr>
  <%}%>
    </tbody>
</script> 
<script type="text/html" id="selectlist">
    <option data-id="0">全部</option>
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option data-id="<%= dataset[i].enumId%>"><%= dataset[i].enumName%></option>
	<%}%>
</script> 
<script type="text/html" id="selectlist2">
	<%for(var i = 0,len= dataset.length;i < len;i++){%>
	   <option value="<%= dataset[i].enumId%>"><%= dataset[i].enumName%></option>
	<%}%>
</script> 
<script src="../../../bower_components/jquery/dist/jquery.min.js"></script> 
<script src="../../../bower_components/jquery-ui/jquery-ui.min.js"></script> 
<script src="../../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script> 
<script src="../../../bower_components/raphael/raphael.min.js"></script> 
<script src="../../../bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script> 
<script src="../../../plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script> 
<script src="../../../bower_components/jquery-knob/dist/jquery.knob.min.js"></script> 
<script src="../../../bower_components/moment/min/moment.min.js"></script> 
<script src="../../../bower_components/bootstrap-daterangepicker/daterangepicker.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script> 
<script src="../../../bower_components/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script> 
<script src="../../../plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script> 
<script src="../../../bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script> 
<script src="../../../bower_components/fastclick/lib/fastclick.js"></script> 
<script src="../../../dist/js/adminlte.min.js"></script> 
<script src="../../js/template-web.js"></script> 
<script src="../../../bower_components/ckeditor/ckeditor.js"></script> 
<script src="../../js/js.js"></script> 
<script src="../../js/RaceList.js"></script> 
<script>
  $(function () {
	CKEDITOR.replace('editor1');
	$('#date0').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date1').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date2').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date3').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date4').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date5').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date6').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
	$('#date7').datepicker({format:"yyyy-mm-dd",language:"zh-CN",autoclose: true,todayHighlight:true});
  })
</script>
</body>
</html>
